﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Attr.aspx.cs" Inherits="Views_Attr" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
        <script type="text/javascript" src="../ViewModels/Attr.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h3>Attr</h3>
    <span>The attr binding provides a generic way to set the value of any attribute for the associated DOM element. </span>
    <div>
        <div class="code">
<xmp>

<a data-bind="attr: { href:href }">Click here to Google</a>
<img data-bind="attr : { src:url, height:100, width:100 }" />

</xmp>
        </div>
    </div>
    <h4>Result</h4>
    <div>
        <a data-bind="attr: { href:href }">Click here to Google</a>
        <img data-bind="attr : { src:url, height:100, width:100 }" />
    </div>
</asp:Content>

